<!--top结束-->
<div class="mian">
	<div class="mian1">
		<div class="mian2">
			<!--left start-->
            <?php $this->load->view('defaults/common/left');?>
			<!--left end-->
			
			<!--right start-->
			<div class="right">
				<!--breadcrumb start-->
				<div class="righta"><?=$this->breadcrumb->generateHTML();?> </div>
				<!--breadcrumb end-->
				<!-- contents start -->
				<div id="contents">
                  
            <div class="ct_content">
                    <div id="ct_header">
                        <style>
                            #table_forms td{border: 1px solid #00ccff;}
                        </style><span style="color:red;font-size: 16px" ><?=$msg?></span>
                        <table cellpadding="0"  id="table_forms" border="1">
                            <tr>
                                <td >
                                    <?= lang('wms_panel_30033') ?>:<?=$NumAtCard?>
                                </td>
                                <td >
                                    <?= lang('wms_panel_30034') ?>:<?=$WhsName1?>
                                </td>
                                <td >
                                    <?= lang('wms_panel_30035') ?>:<?=$WhsName2?>
                                </td>
                            </tr>
                            <tr>
                                <td >
                                    <?= lang('wms_panel_30036') ?>:<?=$U_wlmc?>--<?=$U_ShipName?>/<?=$ShipNum?>
                                </td>
                                <td colspan="2">
                                    <?php if(isset ($merchant_code)):?>
WMS目的仓:<select  id="merchant_whs_code" name="merchant_whs_code"  placeholder="<?= lang('wms_panel_30037') ?>" style=" width: 200px;" >
                                                    <option value =""></option>  
                                            <?php foreach ($merchant_code as $code)
                                            { ?>
                                                <option value ="<?= $code['whs_code'] ?>"><?= '('.$code['whs_code'].')'.$code['whs_name'] ?></option>  
                                            <?php } ?>
                                        </select>
<button id='created_btn' type="button" onclick="createByZC()"  style="margin-right: 20px;width: 150px; height: 30px; margin-left: 20px;" ><?=lang('wms_cjrkdd')?></button>
                                        <?php else:?>
<button id='created_btn' type="button" onclick="window.location.href='<?= blang_url('wms/CreateReceivingOrder/create_byzc') ?>/<?=$NumAtCard?>'"  style="margin-right: 20px;width: 150px; height: 30px; margin-left: 20px;" ><?=lang('wms_cjrkdd')?></button>
                                    <?php endif; ?>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <!-- 列表展示开始List start -->
                    <?php if($items):?>
                    <div class="ct_content">
                        <p><span><?=lang('order_cplb')?></span></p>
                        <table class="c_c_tables tbwd800">
                            <thead>
                            <tr>
                                <th>SKU</th>
                                <th><?=lang('wms_sl')?></th>
                                <th><?= lang('wms_panel_30039') ?></th>
                                <th><?= lang('wms_panel_30040') ?></th>
                                <th><?= lang('wms_mc') ?></th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php foreach ($items as $key=>$rs):?>
                                <tr align="center">
                                    <td><?=$rs['ItemCode']?></td>
                                    <td><?=$rs['Quantity']?></td>
                                    <td><?=$rs['WhsCode1']?></td>
                                    <td><?=$rs['WhsCode2']?></td>
                                    <td><?=$rs['ItemName']?></td>
                                </tr>
                            <?php endforeach;?>
                            </tbody>
                        </table>
                    </div>
                    <?php endif; ?>
                    <!-- 1列表展示开始List end -->

				</div>
				<!-- contents end -->
			</div>
			<!--right end-->
           <div class="clear"></div>
		</div>
	</div>
</div>
<script type="text/javascript">
    function createByZC(){
        //loading层
        var merchant_whs_code =$('#merchant_whs_code').val();
        if(''!=merchant_whs_code){
          window.location.href='<?= blang_url('wms/CreateReceivingOrder/create_byzc') ?>'+'/'+'<?=$NumAtCard?>'+'_'+merchant_whs_code ;
        }

    }
</script>

